package com.yolo.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;

/**
 * ClassName: MybatisPlusConfig
 * Description:
 * date: 2021/3/4 21:04
 *
 * @author 须臾
 * @since JDK 1.8
 */
@Configuration
@MapperScan("com.yolo.mapper")
@EnableAsync//开启异步注解
public class MybatisPlusConfig {

    // 分页插件
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
}
